/*
 * @Author       : huangzb
 * @Date         : 2024-01-18 09:48:59
 * @LastEditors: guangyunl
 * @LastEditTime: 2024-03-09 03:07:17
 * @Description  : file content
 * @FilePath     : \Interface\app\router.js
 */
"use strict";

/**
 * @param {Egg.Application} app - egg application
 */
module.exports = app => {
  const { router, controller } = app;

  /** @name 商品分类接口 */
  require("./router/r_productClass")(app);
  require("./router/r_product")(app);
  require("./router/r_resource")(app);
  require("./router/r_admin")(app);
  require("./router/r_journal")(app);
  require("./router/r_user")(app);
  require("./router/r_coupons")(app);
  require("./router/r_products")(app);
  require("./router/r_classes")(app);
  require("./router/r_ordersManage")(app);
  //轮播图子路由
  require("./router/r_carousels")(app);

  // 商品 -- 子路由
  require("./router/r_goods")(app);

  // 活动 -- 子路由
  require("./router/r_activitys")(app);

  // 购物车 -- 子路由
  require("./router/r_shoppings")(app);

  router.post("/tube/admin/upload", controller.cUploadFile.uploadAvatar); // 全部路由返回接口
};
